Yes. Click Tools/Message Filters
Click New
Give the filter a name
Underneath "Match all of the following",
Click the leftmost dropdown (which says "Subject"), and select "From, To, Cc or Bcc"
Click the next dropdown (which says "contains") and select "isn't in my address book"
Underneath "Perform these actions", click on the leftmost ("move message to") and select "Delete Message".
Click OK.
This won't actually refuse the messages, it will delete them as soon as they arrive.