What can I do to avoid back pains after wearing heels?

Limit heel height. Try and keep the height of the heel below 2 inches. If you have to wear heels to work, go to work in sneakers and change when you get there. Another words, limit your time in the heels. It is not healthy to wear high heels for extended periods of time. Pressure is placed on the knees and lower back and hence such activity should be limited.
Inserts. Various gel inserts can help with back pain after wearing high heels.