Question: In English you sometimes pronounce words in very different pitches/tones to express your emotions. 
For example when you're offended, surprised or when being sarcastic.

Depending on the situation you may for instance answer a question with a sort of falling tone "No.". If the question offends you may answer "No." with a sort of falling-rising tone, almost as if it's a question.
Or if you are uncertain if the anwser should be yes or no, you may answer "No." with a kind of rising tone as if you're asking a question.

Now I wonder how this is done in Mandarin because if you just change the tones of the words, you might actually change the meaning.

Answer: 
Well in China,we use the same way to pronounce words in sentences.We may speak louder with angry tone when we are angry or quarrlling with someone.

For if changing tone may at the same time change the meaning,I want to say that it doesn't matter when you try to understand the meaning of the whole sentence.If you pick the emphasized word out of the sentence,it may sound very strange or just mean another meaning.Well in most cases,it's also recognizable because there are only four tones in chinese and the possible combination is limited,and to express common meaning,the quantity is even decreased to an easily counted number.So most time,we can get what the speaker said.

Well there is another question,that is the accent!It's not in the range of mandarin while I still want to say some.In China there are a large number of different areas.So sometimes even the pronunciation may be changed totally.It's common in China that people in one area can't understand what people in another area radically for historic and territorial reasons.Very interesting for the fact but bothered for communication,isn't it?
In Chinese, I think we pronounce words in different pitches and voice volume to express different emotions with tones staying unchanged. 

If you want to put an emphasis on certain words, you can speak them louder, with a higher pitch, or both. 

If you change the tone, it will change the meaning in Chinese.