We present an approach for rational design and optimization of plasmonic arrays for ultrasensitive surface enhanced infrared absorption (SEIRA) spectroscopy of specific protein analytes. Motivated by our previous work that demonstrated sub-attomole detection of surface-bound silk fibroin [Proc. Natl. Acad. Sci. U.S.A. 106, 19227 (2009)], we introduce here a general framework that allows for the numerical optimization of metamaterial sensor designs in order to maximize the absorbance signal. A critical feature of our method is the explicit compensation for the perturbative effects of the analyte's refractive index which alters the resonance frequency and line-shape of the metamaterial response, thereby leading to spectral distortion in SEIRA signatures. As an example, we leverage our method to optimize the geometry of periodic arrays of plasmonic nanoparticles on both Si and CaF2 substrates. The optimal geometries result in a three-order of magnitude absorbance enhancement compared to an unstructured Au layer, with the CaF2 substrate offering an additional factor of three enhancement in absorbance over a traditional Si substrate. The latter improvement arises from increase of near-field intensity over the Au nanobar surface for the lower index substrate. Finally, we perform sensitivity analysis for our optimized arrays to predict the effects of fabrication imperfections. We find that