This is a complete change from what I wrote before, and thanks to Mikeysco for citing the correct statute on residency. However, considering that statute, I think the officer in this case was absolutely wrong.
The "six months in state" rule is a rebuttable presumption regarding residency regarding vehicle registration. (Veh Code section 516.) That is NOT applicable to drivers licenses. I don't think a student is a resident even under VC 516, but the "state of domicile" rule for drivers licenses in Vehicle Code section 12505 (the only applicable statute) is even narrower. Your domicile is the state where a person has his "true, fixed, and permanent home and principle residence and to which he has manifested the intention of returning whenever he is absent." That simply cannot apply to a DORM!
So, the officer asked the wrong question--six months residence is IRRELEVANT to the issue. If you told him you were a student living in a dorm whose family is in Texas, he should have concluded that your "state of domicile" is NOT California. If you can tell the judge that your "state of domicile" was and is Texas, and there is no contrary evidence (e.g., you didn't register to vote in California), I see no way you can be convicted of this offense. I think you are probably dead on the U-turn, but if I were the judge, I would dismiss that, too, by way of apology.
Your employer should check out the means of dealing with any fees for the impound as recommended by Mikeysco. You might also consider having your employer write a letter of complaint to the police department once this has been taken care of in court.
Of course, if you ARE permanently in California, then you have no defense and the officer was right. You have to have a CA license if you are a resident even if your Texas license has not expired. But given just the facts you have set out, I don't believe you are a resident as defined by VC 12505 and I think that the officer (clearly relying upon the wrong statute) had any reason to think you were.