Control of spin dynamics in a two-dimensional electron gas by electromagnetic dressing