You sure can. Cooking the ingredients on a stovetop is the easiest, most practical solution, but you can definitely choose to do it in your microwave too if you find it to be more convenient.  Just remember to keep stirring the mixture after every 30-second interval, so that it gets to the perfect consistency without burning.