An optimization algorithm is a step-by-step procedure which aims to achieve an optimum value (maximum or minimum) of an objective function. Several natural inspired meta-heuristic algorithms have been inspired to solve complex optimization problems by utilizing the potential advantages of swarm intelligence. In this paper, a new nature-inspired optimization algorithm which mimics the social hunting behavior of Red Piranha is developed, which is called Red Piranha Optimization (RPO). Although the piranha fish is famous for its extreme ferocity and thirst for blood, it sets the best examples of cooperation and organized teamwork, especially in the case of hunting or saving their eggs. The proposed RPO is established through three sequential phases, namely; (i) searching for a prey, (ii) encircling the prey, and (iii) attacking the prey. A mathematical model is provided for each phase of the proposed algorithm. RPO has salient properties such as; (i) it is very simple and easy to implement, (ii) it has a perfect ability to bypass local optima, and (iii) it can be employed for solving complex optimization problems covering different disciplines. To ensure the efficiency of the proposed RPO, it has been applied in feature selection, which is one of the important steps in solving the classification problem. Hence, recent bio-inspired optimization algorithms as well as the proposed RPO have been employed for selecting the most important features for diagnosing Covid-19. Experimental results have proven the effectiveness of the proposed RPO as it outperforms the recent bio-inspired optimization techniques according to accuracy, execution time, micro average precision, micro average recall, macro average precision, macro average recall, and f-measure calculations.