Femtosecond optical gating with a traveling-wave amplifier