Flow-equation approach to quantum systems driven by an amplitude-modulated time-periodic force