Is it possible to buy SIM card in Turkey for the time of travel? If so, how much does it cost and how much do calls, texts and - the most important - data transfer cost in average?
This is a tricky one, but fortunately these days there's a wiki for this - PrepaidWithData.Wikia.
They point out that in theory, you can quite easily purchase a sim in a store in Turkey. However, there are complications:
All mobiles phones purchased outside Turkey using a Turkish SIM card must be registered with the government. There is a grace period of 1-2 weeks (but apparently that can be as short as 2 days?), after which the phone will be blocked for the Turkish SIM.
Before any operator will register your phone, they require a special document from the local Tax Office that will set you back 115 TL (around 40 EUR). So you have to go to the TAX Office first and pay 115 TL to have your phone registered later to finally use a local SIM card.
There are some workarounds which might work, and locals on the ground may have other advice for you. But I'd definitely suggest reading the wiki page about the rules regarding bringing your own phone into the country.
Turkey is really a strange country when it comes to foreign mobile phones operating with a local SIM Card. Although the purpose was fighting against mobile phones' black market, if you don't register your phone's IMEI number, it might get blocked in 60 days according to new law.
If you are staying shorter than 2-3 weeks I would not suggest you to put an effort on registering your phone and buying a local sim card.
A turnaround might be renting a mobile wifi device, if your main concern is using data on your phone. Please take a look at mobile wifi rental offers in Turkey and compare other options.