Nanoscale Photonic Transistor