Yes, you certainly can.
There are many ways you can achieve this. Simple and Straightforward ways are:
- Go to your BuddyPress plugin directory and make HTML changes by searching a class name.
- You can add/modify PHP codes through hooks and filters provided by WordPress.
- You can also change PHP codes through hard-coding in the core BuddyPress files.
Get more information about Hooks/Filters here.