According to the span tables, in order to meet the approximately 100lb per square foot live load and 10lb per square foot dead load, 2x6 will be sufficient if you use Select Grade Douglas Fir lumber place 12" on center.
If the bath is on a second floor, however, 2x6 will not be deep enough to place a standard P-trap within the joists. You may have to use a canister trap instead.