First you will want to make sure to have already configured your Oculus using the software provided with the VR Visor.  

To setup iRacing to use your Oculus, you will need to go to and click on "Settings”.

Then you will need to run the graphics configuration tool by clicking on the "Launch” button.

This will open the "Auto-Configure Graphics” setup.Once you get this screen, click on the drop down menu button:

Then in the list, find and select the display you have previously configured for your Oculus:

The last step is to click the "Auto Configure” button:

Once the configuration completes the Sim will use your Oculus the next time you launch it.
Optionally, you may also use the graphics options in Sim to fine tune some visual settings.

In your rendererdx11.ini file (located in your Documents/iRacing folder), in the Oculus Rift section  there is a value called “autoselect”.  Changing this to 1 and you won’t get a pop up anymore if the headset is connected.