Both can be translated as "what does (it) mean?"
But 「どういう意味ですか」 (itself, without a subject) can be taken as "what's that supposed to mean?" depending on how you say it. So if you wanted to ask the meaning of words or things that people said and you didn't understand, it would always be better (I think!) to put a subject in front of the sentences.
Example:
この単語(たんご=word)はどういう意味ですか?
= この単語はなんという意味ですか?
= この単語の意味はなんですか?
= What does this word mean?
= What's the meaning of this word?
I'm not sure if this answered your question, but I hope that it did. =)