I know that planes that are under 12,500 lb MTOW can be flown by a single pilot. But what about fighter jets like the F-18 and F-35 that way exceed that. For instance, the F-35 has a max takeoff weight of 60,000 lb.
There are actually two different answers to this question.
First, your information that all airplanes over 12,500 lbs. must have two pilots is outdated. Now, while most such planes require two pilots (per FAR 91.153), it's entirely possible for specific planes to be type rated for just one pilot. For instance, the Pilatus PC-24 has a MTOW of 18,300 lbs., but is certified for single-pilot operation.
The second is that the military isn't actually under the jurisdiction of the FAA. So, even if the FAA still required two pilots for all aircraft over a certain weight, that wouldn't apply to a military aircraft.
14 CFR Part 91 flight operations' regulations within the U.S. National Airspace System (NAS) apply to all aircraft (unless specified otherwise). However, requirements for crew composition (i.e. requirements for two pilots relating to the operation of military aircraft) are not governed by the FAA.
With respect to civil aircraft governed by 14 CFR Part 91:
The definition of a "large aircraft" can be found in: 14 CFR Part 1.1
large aircraft means aircraft of more than 12,500 pounds, maximum certificated takeoff weight.
(emphasis is mine)
14 CFR Part 91.531 (a)(2) requires that any aircraft which exceeds 12,500 lbs. MTOW ( a "large airplane") must have two pilots unless it is covered by one of the exceptions noted in 14 CFR 91.531 (b) as shown below.
91.531 Second in command requirements.
(a) Except as provided in paragraph (b) of this section, no person may operate the following airplanes without a pilot designated as second in command:
(1) Any airplane that is type certificated for more than one required pilot.
(2) Any large airplane.
(3) Any commuter category airplane.
(b) A person may operate the following airplanes without a pilot designated as second in command:
(1) Any airplane certificated for operation with one pilot.
(2) A large airplane or turbojet-powered multiengine airplane that holds a special airworthiness certificate, if:
(i) The airplane was originally designed with only one pilot station; or
(ii) The airplane was originally designed with more than one pilot station, but single pilot operations were permitted by the airplane flight manual or were otherwise permitted by a branch of the United States Armed Forces or the armed forces of a foreign contracting State to the Convention on International Civil Aviation.
(c) No person may designate a pilot to serve as second in command, nor may any pilot serve as second in command, of an airplane required under this section to have two pilots unless that pilot meets the qualifications for second in command prescribed in § 61.55 of this chapter.
(emphasis is mine)