Optical microspectrometers using imaging diffraction gratings