Preheat your oven to 350°F (175°C) and prepare your muffin pan by lining it with cupcake liners.
In a medium bowl, whisk together the dry ingredients: all-purpose flour, cocoa powder, baking soda, and salt.
In a small bowl, mix the buttermilk, white vinegar, and vanilla extract.
In a large mixing bowl, cream the softened unsalted butter and granulated sugar together until light and fluffy.
Add the eggs to the butter mixture one at a time, beating well after each addition.
Gradually add the flour mixture and buttermilk mixture to the butter mixture, alternating between the two.
Fold in the red gel food coloring until you achieve the desired color.
In a separate bowl, beat together the cream cheese, softened butter, powdered sugar, and vanilla extract until smooth.
In a small bowl, stir the raspberry preserves with the optional gel food coloring.
Spoon the cupcake batter evenly into the lined muffin pan, dolloping in the cream cheese mixture and raspberry preserves, swirling together.
Bake your cupcakes for 18-20 minutes, or until a toothpick comes out with a few moist crumbs.
Let the cupcakes cool in the pan for about 5 minutes before transferring to a wire rack to cool completely.