Trimming timber support to remove suspected mold
First a disclaimer: You should follow all local by-laws and building codes in your area relating to mold mitigation/abatement to avoid lawsuits and painful death.

Having said that, since your probably going to handle it yourself anyway, here's what to do. The top picture does look like classic black mold but the other two look like a factory sealant of some sort. It just looks too localized to be mold growth. Better safe than sorry though so suit up and buzz out the affected areas with your dremel or better yet an oscillating saw (less dust). Douche any suspicious areas with a store bought mold treatment or bleach/water solution and then reseal the ends of those 2x4's with paint/oil/tar before you close it up and you should be fine.

In all seriousness though, although mold is harmless like 99% of the time and even if all of the stuff in your pictures is mold it would still be the least amount of mold growth in a bathroom substructure I've ever seen, its still nothing to mess around with. Eye protection, gloves, and dust collection are NOT negotiable. Dampen the area when your're cutting to help cut down the dust, and if you want to be really above board, go to a paint supply store and pick up one of those tyvek suits, they're only like $15 dollars. Cheers