Preheat the oven to 350°F (175°C). Grease a donut pan with non-stick spray or lightly oil it.
In a large mixing bowl, whisk together the all-purpose flour, brown sugar, granulated sugar, baking powder, baking soda, cinnamon, nutmeg, and salt until well combined.
In a separate bowl, beat the egg and then add in the buttermilk, applesauce, and vanilla extract. Mix until smooth.
Gradually add the wet ingredients to the dry ingredients, stirring until just combined. Do not overmix.
Fold in the grated carrots and walnuts (if using).
Spoon the batter into the greased donut pan, filling each cavity about 2/3 full.
Bake in the preheated oven for 10–12 minutes, or until a toothpick inserted into the center comes out clean.
Allow the donuts to cool in the pan for about 5 minutes before transferring them to a wire rack to cool completely.
For the maple glaze, whisk together the maple syrup and powdered sugar in a medium bowl. Adjust the consistency with more maple syrup for a thinner glaze or more powdered sugar for a thicker glaze.
Once the donuts are completely cooled, dip the tops into the glaze, allowing any excess to drip off. Return to the wire rack to set.
Optional: Sprinkle some additional chopped walnuts on top of the glazed donuts for extra crunch and presentation.