MEC (Multi-access Edge Computing) is vital in 5G and beyond (B5G) for reducing latency and enhancing network efficiency through local processing, crucial for real-time applications and improved security. This drives the adoption of advanced architectures like Fog Radio Access Network (F-RAN), which uses distributed resources from Radio Resource Heads (RRHs) or fog nodes to enable parallel computation. Each user equipment (UE) task can be processed by RRHs, fog access points, cloud servers, or the UE itself, depending on resource capacities. We propose MoNoR, a centralized approach for optimal task processing in F-RAN. MoNoR optimizes the selection of offloading modes, assignment of tasks to computation nodes, and allocation of radio resources using global network information. Given the computational complexity of this endeavor, we employ an evolutionary optimization technique rooted in Genetic Algorithms to address the problem efficiently. Simulations show MoNoR's superiority in minimizing latency over previous F-RAN offloading strategies.