Atomic spectroscopy with ultrashort laser pulses using frequency-resolved optical gating