Optical quantum memory for ultrafast photons using molecular alignment