Yes, it is perfectly safe and legal to install GFCI outlets on circuits without a ground wire. There is a requirement to mark those outlets with the text "No Equipment Ground" (stickers are often included when you buy a GFCI outlet).
Because a GFCI measures the differential in current between hot and neutral there is no requirement for a ground wire. Note that a GFCI without ground only provides safety against personal injury. If you have the rare situation of equipment that requires grounding for other purposes such equipment may not function properly (e.g.: ground for interference shielding).--
Got some spare cpu cycles ? Join Team Helix or Team Starfire!