Enhancement of the contrast of ultrashort laser pulses by an electro-optic deflector