Active RF pulse compression for accelerator applications