The short answer is: YES. Foreign citizens are not subject to restrictions on their rights to purchase real estate in Germany. Even for non-EU-residents are no restrictions buying a property in Germany, everybody with money can get their own house in Germany!
They are entered in the land register as the owner of the land on which your property is located. Although the mere fact of a real estate property promises no permanent residence in Germany, you get the privilege of a constantly re-renewable short-term visa (Schengenvisum) for Germany over the period of 90 days.
To obtain a residence title in Germany requires you to prove that you would bring benefits to the German State. If you are a professional in one of the sought-after areas of activity or a big investor who creates jobs, you have much higher chances of obtaining a residence permit.
An entrepreneur can obtain a residence permit for the purpose of self-employment, if a superior economic interest or special regional needs exist, the activity is expected to have positive effects on the economy and financing has been secured (§ 21 para. 1 sentence 1 of the Residence Act). Typically, these conditions are met at an investment of 250,000 euro and the creation of five jobs .
If the self-employed has succeeded and the livelihood is secured, he or she may, obtain a settlement permit after three years ( § 21 para . 4 of the Residence Act ).
You can obtain additional information at http://www.bamf.de.