Beets act as a natural food coloring and give these cupcakes a tender crumb. Microwaving the beets and adding lemon juice for acidity helps retain their color, making the cupcakes even more red.
Preheat oven to 350°F. Wrap beets in parchment paper. Microwave on HIGH until tender, 8 to 10 minutes. Cool beets wrapped in paper until just warm to the touch.
Peel beets, and coarsely chop. Process chopped beets and lemon juice in a food processor until finely chopped, stopping to scrape down the sides of the bowl as necessary. Add oil and buttermilk; process until smooth. Add eggs; process until completely combined. Whisk together flour, sugar, cocoa, baking powder, salt, and baking soda in a large bowl; add beet mixture, and whisk just until combined.
Line 2 (12-cup) muffin pans with baking liners. Using an ice-cream scoop, a spoon, or a liquid measuring cup, fill liners two-thirds full with batter. Bake in preheated oven until a toothpick inserted in center comes out clean, 15 to 18 minutes. Cool in pans on wire racks 5 minutes. Remove from pans to racks, and cool completely, about 25 minutes.
Meanwhile, beat cream cheese and butter in the bowl of a stand mixer fitted with paddle attachment or with a handheld mixer on medium speed until very smooth. Gradually add powdered sugar, beating on low speed until blended and light and fluffy. Beat in vanilla. Spread frosting on cupcakes using an offset spatula. Or spoon frosting into a ziplock plastic freezer bag; snip 1 corner of bag to make a small hole, and pipe frosting on cupcakes. Sprinkle with pecans, if desired.