Compact wavelength detection system incorporating a guided-mode resonance filter