No you may not. It is in the terms of service.
"# Servers are shared with other customers, and as such IRC-related activities or severely CPU intensive CGI scripts (e.g. chat scripts, scripts which have bugs causing them to not close properly after being run, etc.) are not encouraged. Any application that listens for inbound network connections (even if the application would otherwise be allowed) are not permitted. BitTorrent clients, proxy servers/scripts, IRC bots and bouncers (BNC) specifically may not be run on any DreamHost Web Hosting server. If your processes are adversely affecting server performance disproportionately DreamHost Web Hosting reserves the right to negotiate additional charges with the Customer and/or the discontinuation of the offending processes."