There's an in-depth guide on how to get it working over on the. It involves some tinkering with the config files, but nothing too complicated. Full patched support is coming further down the line.
"We have tested both the DK1 and DK2, and released support using SDK 0.4.1, which contains the Direct to HMD rendering mode, as well as extended desktop mode. We recommend using the Direct to HMD mode," writes Codemasters.
As you would expect, it's not quite perfect just yet. "This support is only experimental, and as such, there are some in-game options that may cause crashes if you try to change them in game – examples of these are changing resolution, and resizing the window." Menus screens aren't designed with VR in mind, so Codemasters recommends only turning VR on when you're about to race. They also suggest using the 'low' graphics settings at first.
If you'd rather hold on for an official patch it sounds like you won't have long to wait. "Support for Oculus Rift will arrive in an upcoming PC patch," the developer confirms, "which we’re expecting to launch very shortly."