Photonics-assisted beamforming for 5G communications