Yes, of course you can; from the help center:
http://stackoverflow.com/help/self-answerhttps://stackoverflow.com/help/self-answer
And the most famous example of this:
What is a NullReferenceException, and how do I fix it?What is a NullReferenceException, and how do I fix it?
Just make sure both the question and answer are up to the quality standards of SO and you'll be fine. "How do I debug my code in < insert IDE >" could easily make a good canonical question (though it smells a bit broad).