You probably could but I think retroengineering the plugin to work in both wordpress and bbpress would be more trouble than its worth. My site just uses two very simple avatar plugins that work basically the same, 68-gravatar and 4avatars. I know one plugin would be simpler to maintain but I think the amount of work required to make it function in both would be counter productive unless you had a really good reason to want the same one in both