This paper solves the optimal operation problem of distribution systems using renewable energy sources and voltage regulators. The developed model makes use of Whale Optimization Algorithm based optimization. We apply the proposed optimization model to a modified low voltage distribution system of Almaty, Kazakhstan. Three different cases were simulated. The cases considered are medium load level with medium PV power output, high load level with medium PV output, and high load level and low PV power outputs. The simulation results show that the proposed algorithm is able lower the active power losses.