Preheat oven to 350°F (180°C). Line baking sheets with parchment paper.
In a medium bowl, whisk together the flour, baking powder, salt, and spices. Set aside.
In a large bowl, beat butter, syrup, and sugar together until light and fluffy. Stir in egg and vanilla.
Gradually add flour mixture to the butter mixture until just combined. Do not overmix.
Stir in the grated carrots, raisins, and pecans (if using).
Drop by rounded tablespoonfuls onto prepared baking sheet, leaving about 2 inches of space between each cookie.
Bake for 12-14 minutes, or until lightly golden brown around the edges.
Allow cookies to cool on the baking sheet for a few minutes, then transfer them to a wire rack to cool completely. If desired, frost with cream cheese frosting.