Based on the edited question, now that we are talking about the BC337, I will make comments specifically about that part.
First of all, the section at the beginning labeled "Maximum Ratings" should not be used for design. In other words, if Vceo maximum is given as 45V, you should avoid exposing the IC to 45V. Maybe stay at 40V or below.
Also, note that you should avoid all of the maximums. You have noted the voltage limit and the current limit, but you should also note the power limit. In this case, there are two power limits, which give different conditions. One applies when Ta (ambient temperature) is 25C, and the other applies when Tc (case temperature) is 25C. For our purposes, we can ignore the Tc limit because it is essentially impossible to keep the case at 25C when the transistor is dissipating a lot of power.
The second thing to note about the Ta limit is that it only applies when ambient is 25C. See the note which says the limit must be derated by 5mW/C. This means that for every degree above 25C, you must subtract 5mW from the limit. For example, if the ambient temperature is 45C, that is 20 degrees above 25C. So the limit will be 625mW - (20 * 5mW) = 525 mW.
The power dissipation is Ic * Vce + Ib * Vbe. So you will have to calculate that with your specific operating conditions and see if it works out.
But if you actually need something like 800mA, I suggest you look at using a MOSFET. The DC gate current on a MOSFET (analogous to Ib) is negligible, and the voltage drop from drain to source (analogous to Vceo) is typically much smaller, so the MOSFET doesn't need to dissipate as much power.
Hope this helps.