Answering your own questions is something that's actually encouraged when you ended up solving your own problem after you posted your question.
There's even a badge you can get from answering your own questions:

And yes, you can also use it to ask a question you already know the answer to, just to get the question and answer out there in case they might help someone else. Just try not to exaggerate with that and flood SO with questions you're answering yourself. Also, if you intended on doing so, make sure those questions aren't duplicates of other questions and they are neither too broad nor too specific to be helpful to others.
As an alternative to posting questions you already know the answer for, you might also want to consider SO's documentation feature. If you just want to share with others how you approached a certain situation, "documenation" may be a more suitable format than SO's traditional Q&A format.
Choose wisely ;-)