The best questions are for problems you actually have, but it is fine to ask a particularly interesting question you came across in your work, for example a question for a problem you had in the past and for which you already found a solution. Just be careful about asking questions simply for the sake of filling the site, for gaining easy reputation, or for talking about projects you maintain.
To quote what Jeff Atwood said, on Posting and answering questions you have already found the answer to:
Absolutely, that is one of the design goals for the site: to be a frictionless technical mini-blog where you get reputation for your hard work.
Since May 2012, you can even write your answer before posting the question: see What is this "answer your own question" jazz? here on Meta, and Encyclopedia Stack Exchange on the blog.
As long as the post is phrased in the style of a question, none of the closing reasons apply, and it is useful for other users, then it could be a valuable addition to the site.
As usual with other questions, How to not be a spammer and How do I ask a good question? also apply to self-answered questions. In particular, this means that self-answered questions need to give the same details required from other questions; the fact the question is self-answered doesn't mean the question can be too generic, simply for the fact the user who is going to answer knows well the topic being asked.
Related questions on the network