Mach-Zehnder electrooptic intensity modulators (EOM) provide efficient intensity modulation in optical systems and can be used to shape laser pulses. It is necessary to avoid a low extinction ratio-which can cause a significant prepulse-by maintaining a low base modulation. The EOM’s modulation can be modeled by its nonlinear transfer function and is dependent on environmental conditions. A feedback algorithm was devised to regulate the EOM’s base intensity output and account for these dynamic environmental conditions. The field programmable gate array-based control algorithm interlaces a set of diagnostic pulses between the laser’s main pulses to map the transfer function. After mapping, the algorithm utilizes curve fitting to accurately target the minimum of the EOM’s transfer function and maintain the EOM’s highest possible extinction ratio. Testing demonstrated the effectiveness of the algorithm in maintaining a high extinction ratio in response to both the temperature and temporal drift of the transfer function.