We demonstrate high-performance nanowire superconducting single photon detectors (SSPDs) on ultrathin NbN films grown at a temperature compatible with monolithic integration. NbN films ranging from 150nm to 3nm in thickness were deposited by dc magnetron sputtering on MgO substrates at 400C. The superconducting properties of NbN films were optimized studying the effects of deposition parameters on film properties. SSPDs were fabricated on high quality NbN films of different thickness (7 to 3nm) deposited under optimal conditions. Electrical and optical characterizations were performed on the SSPDs. The highest QE value measured at 4.2K is 20% at 1300nm.