Possibly. You certainly can try, but I doubt it, as the judges may be worried about the example it sets for others who might see this as an easy way out of prison.
I had a client who did this and the judge pulled him out of the rehab facility and sent him to prison, but it was clear he might not have done so if my client had been more respectful of the system earlier.
It would definitely help, however without knowing more information it is difficult to say. It depends on your prior record, whether any of these cases have been resolved, were there any other charges with the drug charges? If you have no prior record, then you may be eligible for Prop 36 treatment on all the drug cases, and it may be possible to avoid custody if this is a first DUI but it depends on drug or alcohol levels, was there an accident or dangerous driving? There are too many variables to give you a good answer. Many times, with multiple cases, some get dismissed in plea bargaining, rehab or alternatives to custody can also be negotiated. You should definitely seek experienced criminal and DUI represention with an attorney familiar with your local Court and prosecutors and discuss it with the attorney.
Most judges will consider drug treatment, successful drug treatment, when considering a sentence. Entering will help you help yourself not only in overcoming your addiction, but will provide your attorney with tools to minimize incarceration. It may also provide an opportunity for your attorney to request a reconsideration of your sentence, and get you home sooner, or open the door, no pun intended, for home incarceration if that is available in your state.