In this work, we outline a methodology for determining optimal helical flagella placement and phase shift that maximize fluid pumping through a rectangular flow meter above a simulated bacterial carpet. This method uses a Genetic Algorithm (GA) combined with a gradient-based method, the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm, to solve the optimization problem and the Method of Regularized Stokeslets (MRS) to simulate the fluid flow. This method is able to produce placements and phase shifts for small carpets and could be adapted for implementation in larger carpets and various fluid tasks. Our results show that given identical helices, optimal pumping configurations are influenced by the size of the flow meter. We also show that intuitive designs, such as uniform placement, do not always lead to a high-performance carpet.