You should be able to shoot with complete legal immunity. To do otherwise puts the onus on the homeowner, who should be on top of this particular totem pole, to guess correctly whether the invaders are cops or criminals. That's not acceptable, no matter if there is a good outcome we're trying to get to by illegitimately forcing him to take that responsibility. The ends do not justify the means, and the cops shouldn't expect the public to jeopardize their own security to guarantee officer safety. They signed up to serve the public, citizens never signed up to serve the PD.
So if the cops have a valid search warrant, and they come at a time you do not approve of, you can shoot them, right?