The best questions are for problems you actually have, but it is okay if you ask a particularly interesting question you came across in your work. Just be careful about asking questions simply for the sake of filling the site with content, and 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, it is on-topic for Drupal Answers, 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 applies also to self-answered questions.