  We derive composite pulse sequences that achieve high-fidelity excitation of
two-state systems in an optically dense, inhomogeneously broadened ensemble.
The composite pulses are resistant to distortions due to the back-action of the
medium they propagate in and are able to create high-fidelity inversion to
optical depths $\alpha z>10$. They function well with smooth pulse shapes used
for coherent control of optical atomic transitions in quantum computation and
communication. They are an intermediary solution between single $\pi$-pulse
excitation schemes and adiabatic passage schemes, being far more error tolerant
than the former but still considerably faster than the latter.
