Preheat the oven to 350°F. Line two baking sheets with parchment paper.
Cream the butter, brown sugar, and granulated sugar with an electric mixer until light and fluffy, about 5 minutes. Beat in the pumpkin purée, pumpkin pie spice, vanilla, and salt until smooth.
Add the oats, flour, and baking soda. Mix on low speed just until combined, then finish mixing with a spatula if needed. Do not overmix.
Scoop heaping tablespoons of dough onto the prepared baking sheets, leaving about 2 inches between cookies. Lightly flatten each mound with damp fingers, as the cookies won't spread much.
Bake for 14 to 16 minutes, rotating the pans halfway through, until the cookies are set and the edges are lightly golden. Cool completely on the baking sheets.
Make the frosting, if using, by beating the butter, powdered sugar, pumpkin purée, pumpkin pie spice, vanilla, and a pinch of salt until light and fluffy, about 3 minutes.
Frost the cooled cookies with about 2 teaspoons of frosting each.