Not officially. In most places here, you need a permit to let rooms to 3 or more people in a single property. And when the permits are issued, they don't just take fire safety concerns into consideration, but also livability, impact on the block and the neighborhood, noise issues, available parking and so on. I don't think they get issued when tenants don't get their own room at least.
Solution: don't apply for the permit and just let the place. Works especially well if its your own workers you're housing, not an uncommon arrangement even if it's highly illegal.