This paper develops a mathematical model for optimal capacitor placement and sizing in radial distribution systems. The optimization model finds placement and sizes of capacitors considering variations on load profiles with 15-minute resolution. A recently developed heuristic algorithm, Moth-flame Optimization Algorithm, is modified and used to solve the model. Optimization model is tested on a modified 33-node distribution feeder. Two simulation cases are considered: the first one assumes a constant tap position of the regulators, the second one adjusts the tap positions optimally to some constant daily values. The simulation results show the improvement of the voltage profiles with the modified Moth-flame Optimization.