I asked a policeman who was issueing me a police report after my house was burglerized if I can shoot the bad guys if I'm home....

He said sure. Make sure they're not kids. Make sure you shoot them in the front side. Make sure he has a weapon. If no weapon give him one.
Make sure he's dead. You can get your ass sued if he's not dead.