Preheat oven to 350 degrees F. Line cupcake tin with paper liners, set aside.
In medium bowl, whisk together flour, baking soda, salt, and apple pie spice. In large bowl, cream together butter and sugars, using electric mixer on high, until light and fluffy, about 5 minutes. Add in egg, egg yolk, lemon zest, lemon juice, and vanilla extract; stir until well combined. Stir in flour until just incorporated. Drain excess juice from grated apples with a fine mesh strainer; add to batter and fold in.
Fill each prepared cupcake tin about halfway with batter. Bake until toothpick inserted in middle comes out clean, about 18 to 20 minutes. Remove from oven and let cool in pan 5 minutes before transferring to wire rack to cool completely.
In medium saucepan, combine brown sugar, butter, and heavy cream. Cook over medium heat, stirring until sugar has dissolved. Stop stirring and let cook and bubble 5 minutes. Remove from heat and stir in salt and vanilla. Transfer to large bowl and let cool to room temperature.
Reserve about 1/4 cooled caramel in small bowl; set aside. Add powdered sugar to remaining caramel (in large bowl) and beat on high until light and fluffy. If buttercream is too stiff, add a teaspoon of heavy cream at a time until desired consistency is reached.
Frost each cupcake with caramel buttercream, drizzle with reserved caramel and then sprinkle with chopped nuts. If desired, place a small wooden popsicle stick into each cupcake to make it look like a caramel apple. Store cupcakes in fridge until ready to serve.