Relays vs. thyristors: What is best for swiching 230 V lights on and off rapidly (~ 5 Hz)?
Mechanical relays won't last long if forced to switch at 5 Hz, but solid state devices (thyristors, triacs or transistors) are perfect for your task.  

Instead of coming up with your own thyristor/transistor circuit, I suggest that you use a solid state relay. It's easier and safer. They consist of an optocoupler (for electrical isolation of the logic level input), a driver circuit and some kind of solid state switching element, all integrated into a single off-the-shelf package.