In a large mixing bowl, beat the unsalted butter and granulated sugar together using an electric mixer until the mixture is light and fluffy, about 3-4 minutes.
Add the egg yolk, vanilla extract, and pistachio extract (if using) to the butter mixture. Mix until well combined.
In a separate bowl, whisk together the all-purpose flour, Dutch-processed cocoa powder, and fine sea salt. Gradually add the dry ingredients to the wet mixture, mixing just until combined. Be careful not to overmix.
Cover the dough with plastic wrap and refrigerate for at least 30 minutes.
While the dough is chilling, preheat your oven to 350°F (175°C). Line a baking sheet with parchment paper.
Once chilled, scoop out tablespoons of dough and roll them into balls. If you wish to roll the cookies in chopped pistachios, first dip each dough ball into the reserved egg white and then roll in the coarsely chopped pistachios.
Place the dough balls on the prepared baking sheet, leaving space between each cookie. Use your thumb or the back of a measuring spoon to gently press an indentation into the center of each dough ball.
Bake in the preheated oven for 10-12 minutes, or until the edges are set but the centers are still soft. Remove from the oven and allow them to cool on the baking sheet for a few minutes before transferring to a wire rack to cool completely.
While the cookies are cooling, melt the white chocolate using a double boiler or microwave. Once melted, allow it to cool slightly before mixing in the pistachio butter, powdered sugar, fine sea salt, and any optional extracts. Stir until smooth.
Once the cookies are completely cool, use a spoon or piping bag to fill the thumbprint indentations with the pistachio cream mixture.