Suppression of magnetic state decoherence using ultrafast optical pulses