Integrated optic grating-coupler-based optical head