Preheat the oven to 350F degrees and spray a doughnut pan with non-stick cooking spray. You'll end up with 6-8 doughnuts, so you may need to grease 2 pans or make the doughnuts in 2 batches.
In a medium-sized bowl whisk together the flour, cinnamon, nutmeg, baking soda and salt. Set aside. Then in a separate medium-sized bowl whisk together the oil, sugar, egg, vanilla and sour cream.
Stir the flour mixture into the oil mixture using a spoon or rubber spatula, then stir in the shredded carrots. Be careful not to over mix the batter. Then spoon the batter into the prepared doughnut pan filling each cavity about two thirds full, or pipe the batter into each cavity using a piping bag or ziploc bag with the bottom corner cut off. You'll end up with 6-8 doughnuts.
Bake in the preheated oven for 8-10 minutes, or until if you gently touch a doughnut with your finger it's slightly springy. Allow to cool in the pan for about 5 minutes, then remove the doughnuts from the pan and continue cooling on a wire rack.
Make the Cream Cheese Glaze
As the doughnuts are baking or cooling, make the glaze. In a small bowl beat the cream cheese using an electric mixer until soft. Then carefully beat in the powdered sugar and the cream as necessary. You may need to add a little extra powdered sugar or a little extra cream as necessary.
Frost the top of each doughnut using a piping bag or a flat edge knife. Then sprinkle walnuts on top of each.
If you don't have a doughnut pan, the batter can be baked in a muffin pan for about 20-25 minutes at 350F degrees.