Are there laws about how close military aircraft can fly to passenger jets, and are they enforced?
This is somewhat speculation, but here's what I think happened:

You were flying at around 35,000 feet, in RSVSM airspace. The fighter jet was correctly on track 1000 feet below you. Without any other guides of distance, you tried to judge its distance by apparent size compared to real size. You might have underestimated the size of a fighter jet; they're typically about 50 feet long. I know I, for one, always thought they were much smaller. Thus what looked like "slightly below" was actually 1000 feet below you.

As for the more general question you posted: the military can get as close to other aircraft as they damn well please, through a procedure called Military Assumes Responsibility for Seperation of Aircraft, or MARSA (thanks to fooot for pointing this out!). Generally this only happens with a civilian aircraft during an interception. I don't know the specific procedures that are followed, but I know that in the past intercepting pilots have gotten close enough to pick out individuals in the cockpit.

As for enforcement, the question is kind of null. Generally, if civilian pilots violate separation without putting anyone in danger, the air traffic controller will just yell at them for a bit, but it does depend on the case. The FAA doesn't have much authority over the military, however. If the air traffic controller passed the information on to the military, perhaps there could be some sort of corrective action, but at this point I'm just guessing.