Optomechanical generation of a photonic Bose-Einstein condensate