We examine structural and dynamical properties of quantum resonances associated with an avoided crossing and identify the parameter shifts where these properties attain maximal or extreme values, first at a general level, and then for a two-level system coupled to a harmonic oscillator, of the type commonly found in quantum optics. Finally the results obtained are exemplified and applied to optimize the fidelity and speed of quantum gates in trapped ions.