eco- I am probably saying something similar to aeh, but some if my DS's social gaffes arise from inflexible thinking. In the instance of the field trip he could not think past the question that was asked and look for other possibilities. He also could not understand why his teacher seemed upset by his honesty, when he's been taught to tell the truth.
These are big problems for social understanding- inflexibility and empathy. When I say empathy, I'm not talking about decency and compassion- I'm using the word in the pure sense of being able to put oneself in another's shoes during a social interaction. Maybe a better word is metacognition
Social skills therapy can help.