You might want to look into the law first. An expired inspection may be grounds for an invalid registration, which is written up as expired. Purely speculation, though.
You should be able to find it somewhere online. I've fought tickets for parking in my own driveway. Was parked on the concrete between the sidewalk and the street, got a ticket for it. The law was written to keep people off of the grass which is considered part of the city's easement, but I had to reference other laws to prove that I was not in the wrong. I've been parking that way for about 5 years at that point, but this was the first time I got the ticket. It was only $15 but that wasn't the point.
If you keep letting the police get away with something that isn't right, it only gets worse. If he's going to give you a ticket, he has to do it right. It's their job to enforce the laws, but its your job to push back if they are doing it wrong or overstepping their boundaries. IMO, its part of a citizen's responsibility. ALL authority figures must be held accountable.