Diffraction properties of ultrashort pulsed beams with arbitrary temporal profiles studied with a volume holographic grating