Stochastic homogenization of elliptic equation and optimal control