Fiber orbital angular momentum (OAM) modes can be employed in mode-division multiplexing to increase the channel capacity in optical communication systems. Over the years, several experiments to excite high-purity OAM modes by using one phase-only spatial light modulator (SLM) have been conducted. Since phase-only SLMs are intrinsically imperfect for this purpose due to the impossibility to simultaneously modulate both amplitude and phase in the light source, optimal phase masks need to be generated by iterative algorithms. However, if the state of every pixel in the mask is an unknown of the problem, the computational cost is extremely high. The system circular symmetry can be exploited to overcome this issue. Here, for the fist time, this approach is implemented and a simple machine learning algorithm is developed to calculate optimal phase masks with a low number of unknowns and iterations. Simulated and experimental results show that the developed technique is capable of exciting high-purity OAM modes.