Using a Raspberry Pi is massive overkill. A $20 XBee module, a $3 microcontroller, and a custom PCB will do the trick; you can then control it all from your PC with another XBee radio. It'll probably be easier than making Linux deal with your relay, because microcontrollers are easy mode. Even an Arduino would be expensive overkill for this project.