Coupling spatially and spectrally resolved optical measurements with a scanning probe system