The severe weight limitations of flapping wing micro air vehicles necessitates the use of thin flexible wings, which in turn requires an aeroelastic modeling tool for proper numerical characterization. Furthermore, due to the unconventional nature of these vehicles, wing design guidelines for thrust and/or power considerations are not generally available; numerical design optimization then becomes a valuable tool. This work couples a nonlinear shell model to an unsteady vortex lattice solver, and then computes analytical design gradients: the derivative of aerodynamic force/power quantities with respect to a large vector of thickness variables. Gradient-based optimization is then used to locate the wing structure that maximizes the thrust, or minimizes the power under a thrust constraint, for a variety of shell boundary conditions. Changes in the topological features of the optimal wing thicknesses highlight important aeroelastic interactions that can be exploited for efficient flapping wings.Published by Elsevier Masson SAS.