No, this will strip out too many characters. For instance, even in the public key you quoted there are '/' and '+' characters, both of which need to stay there. Your proposed change (I think) would remove those characters.
In addition, the KeyValueList.pm class is used to parse the DKIM-Signature header of incoming email messages, and signatures can/should contain non-alphanumeric characters as well.
What error do you get? I think the only invalid character in the key you quote is the backslash at the end of the k=rsa value. Am I right?