Generation of controllable nondiffracting beams using multimode optical fibers