On-demand microwave generator of shaped single photons