Utilizing light propagation and optical nonlinearities is one of the strategies to accelerate computational tasks in tandem with electrical circuits in an energy-efficient manner. Computing with multimode optical fibers has been demonstrated to be energy efficient due to the high light confinement and multidimensionality. However, these optical nonlinearities have not been programmed for a specific computational task and thus the performance is not optimal. In this study, we demonstrate that the nonlinear transformation in the fiber can be programmed to obtain improved performances on several different machine learning tasks by shaping the wavefront of the information encoding beam.