Heat the oven to 400 degrees F and line 2 12-muffin tins with paper liners.
Sift together the flours, cinnamon, baking soda, and salt.
Using a standing mixer fitted with a paddle attachment, beat the sugar, oil, and vanilla until smooth. Add the eggs, one at a time.
With the mixer on low speed, add half of the dry ingredients. Add the grated carrots and the raisins if using to the remaining flour, mix well, and add them to the batter. Mix until just combined.
Scoop the batter into the liners, filling each about 3/4 full (you should end up with 22 muffins). Bake for 10 minutes then reduce the oven temperature to 350 degrees and cook for another 30 to 35 minutes, until a toothpick comes out clean. Cool the muffins completely on a rack before serving.