On-chip generation and dynamic piezo-optomechanical rotation of single photons