Can I connect only two wires to GFCI receptacle?
It is perfectly to code to replace a two-prong outlet (without an available ground) with a GFCI.

Never, ever, make a bootleg ground by connect the neutral to the ground pin. It may seem to work, bug under some extreme circumstances, you could end up with lethal voltages on the ground pin.