How do I offset flashing of IR remote in Arduino?
You really should be using the microcontroller to decode the transmissions from the   IR remote. If you do that you could see when some particular button is pressed and take action on that specifically. For examples:


Decode two different buttons one which turns the relay on and another that turns it back off. 
Watch the repeating transmits from the remote control as as long as the same button is pressed keep the relay on. 


If you still want to make it work just on the detection of modulation from the IR receiver then use an oscilloscope to see how often the remote sends the transmissions. (These things often will send at a repeat rate of ten times per second).

A better scheme would be to detect the start of the transmission detection and then turn on the relay based upon that. Then shut the relay off if there has been  no start of detection within say .15 seconds. The reason this could be better is that some IR remotes will send a long packet when a button is first pressed and will then send a very short packet in repeat indication as the button is held down.

The problem with any simple envelope detection like you are doing now and in these latter described schemes is that they are very susceptible to IR interference. If you look at the output of a typical IR receiver module with an oscilloscope it is not uncommon to see all kinds of random detects coming out even when the IR remote control transmitter is not active. This is why I initially recommend that you decode the transmission protocol itself to ensure that you are seeing legitimate transmissions.