CMOS nanophotonic sensor with integrated readout system