Yes, you can change your gender on your passport. You will be required to hand in a letter from your physician confirming your gender transition. The medical certification must be signed by a licensed physician. It should be in an office letterhead which includes:
Physician’s details: full name, address and contact number
License or certificate number
Issuing state or other jurisdiction of medical certificate
The letter should state that the physician has treated you and evaluated your medical history. You have also received clinical treatment for your transition or are in the process of transition.
The letter should include the following, “I declare under penalty of perjury under the laws of the United States that the foregoing is true and correct.”