Yes, you can buy houses and flats. Talking land - some restrictions still exists. And remember: if you are nonresident here you must pay more taxes, please, consult your lawyer.
Legislation in 2001 brought the opening up of real estate to foreign investment. The Land Code of 2001 allows private ownership of land and properties, both by locals and foreigners.