Optical readout of a triple-GEM detector by means of a CMOS sensor