Normally we run Linux on the RPI and csureate applications that run under Linux. Even with the real-time extensions for linux it is highly unlikely that you will get the deterministic timing you need for this type of motor control.
You can run programs on a Raspberry Pi without Linux (aka Bare Metal Applications). Your program basically replaces the boot loader and instead of loading linux, your program just runs in place. This gives your program low-level access to (and total control of) all the processor and board hardware. The catch is that you loose all those nice things the OS normally provides like a network stack, thread management, filesystem, etc etc.
If you are getting started, I would strongly suggest looking at Mouser, Digikey or a distributor that does business in your country and taking a look at the brushless motor driver development kits. Vendors have already figured out what is required and built everything into processors and DSPs. Designing BDLC controllers has a few pitfalls and starting with a reference design is a good idea.