Preheat oven to 350°F (175°C). Grease baking sheets, or line with parchment paper.
In a large bowl, cream together the butter and sugar until light and fluffy. Beat in the egg and vanilla.
In a separate bowl, whisk together the flour, salt, nutmeg, and cinnamon. Gradually add the dry ingredients to the creamed mixture, stirring until just blended.
Stir in the walnuts, if desired. Roll the dough into 1-inch balls and place them 2 inches apart on the prepared baking sheets.
Flatten each ball slightly with the bottom of a glass. Bake for 10 to 12 minutes in the preheated oven, or until edges are lightly browned.
Cool cookies on baking sheets for a few minutes before transferring to a wire rack to cool completely.
Interesting Facts
Sandtarts are a traditional German cookie, but variations of the cookie are made in many countries.
The name "sandtarts" comes from the fact that the cookies are made with a sand-like dough.
The cookies are usually flavored with cinnamon and nutmeg, but other spices can also be used.
Sandtarts are often decorated with sprinkles or nuts before baking.