If a comedian showed up to a mic and started making the sort of Holocaust joke that an insensitive person would make after a few beers, they might get some laughs, but laughs aren't the goal--the goal is to have a good set that people like and remember. Their set would likely flop and they would likely not invited back. I dabble a bit in comedy and, yes, I have seen this happen.
This example holds for most sensitive subjects. So no, it is not acceptable in comedy to say anything for the sake of getting a laugh.