We discuss the production of ultracold molecules in their electronic ground state by photoassociation employing electronically excited states with ion-pair character and strong spin-orbit interaction. A short photoassociation laser pulse drives a non- resonant three-photon transition for alkali atoms colliding in their lowest triplet state. The excited state wave packet is transferred to the ground electronic state by a second laser pulse, driving a resonant two-photon transition. After analyzing the transition matrix elements governing the stabilization step, we discuss the efficiency of population transfer using transform-limited and linearly chirped laser pulses. Finally, we employ optimal control theory to find the most efficient stabilization pathways. We find that the stabilization efficiency can be increased by one and two orders of magnitude for linearly chirped and optimally shaped laser pulses, respectively.