On the existence of optimal controls for backward stochastic partial differential equations