Optically controlled phased array