I've never applied for a visitor visa before, but can I apply for one to the UK before I have the actual plane ticket booked?

I'm a US citizen and I know I don't need a visitor visa but I'd like to apply for one since I'm planning on going there for 6 months to stay with my boyfriend, and if I'm going to be refused I'd rather have it done before I fly to the UK.