Stir together first 7 ingredients.
Beat butter and sugar at medium speed with an electric mixer until fluffy. Add eggs and vanilla extract, beating until blended. Gradually add flour mixture, beating at low speed until blended.
Stir in oats, chopped pecans, and if desired, raisins.
Drop dough by 1/4 cupfuls onto lightly greased baking sheets; lightly press down dough.
Bake, in batches, at 350° for 12 to 14 minutes. (Cookies should not be brown around the edges, and centers will not look quite done.) Cool slightly on baking sheets. Remove to wire racks; cool completely.