I would operate in this situation under the idea of “Who would be really pissed if they weren’t invited?” This can, of course, drive you crazy since everyone thinks differently about these sorts of things, but as for me, there are only very few people who would offend me if I weren’t invited to their wedding to the point where no explanation would honestly placate me. They are: parents, offspring, siblings, and best friends. I have a number of decently close friends whose weddings I would be most interested in attending, but where that isn’t particularly necessary since the reception would more or less be the highlight for me. But for the people on this list, it’s the ceremony that would be the highlight. So I would focus on them, and try to invite as many of them as possible.
I’m guessing that this wedding is to take place in the judge’s chambers, and so the ceremony is likely to be short, on the order of twenty minutes or so. If this is true, I would think that inviting the significant others of the people on the list would not be necessary for the most part. (An exception would be if you have a stepparent that was for you a real parent in all but name.) Anyway, taking random, but plausible, numbers for this gives:
2 groom’s parents*
2 bride’s parents*
3 groom’s siblings
3 bride’s siblings
2 groom’s best friends
2 bride’s best friends
This leaves one spot, which maybe you could save for grandma or something.
Anyway, it seems to me that you want this to be a slightly bigger wedding than you actually planned for. I know that financial considerations might impose themselves, but have you looked into getting a slightly bigger space? I’m assuming that you’re getting married in chambers, but might it be possible to get married in a courtroom? That might cost only a little extra and spare yourself and the future spouse the difficulty of having to limit the number of guests so severely. A bit of a trade off between peace of mind and money, to be sure.
Might it also be possible to have a camera set up, so that people at the reception site can watch on TV? A bit tacky, but I can imagine your semi-close friends with a drink in their hands having a good time, watching and enjoying themselves without having to be on their best behavior. Having some sort of shout-out to them would be nice in this situation, maybe.
*If this is a same-sex wedding, adjust the vocabulary accordingly. Is there a sex-neutral word for a participant in a wedding ceremony? Like matrimoniant or something?