Yes, you can.
However, your SS benefit will be reduced if you did not pay ss tax as a government emplyee. This is the link you can read:
However, your SS benefit will be reduced if you did not pay ss tax as a government emplyee. This is the link you can read: