According to the Texas Department of Public Safety's website, holders of valid driver's license can receive an 'M' class license with a p36 restriction by taking the motorcycle knowledge test. You can find the information here.
In Travis county, however, the DPS is currently handling things a bit differently. In order to drive your moped legally, you must take a Motorcycle Safety Course at a state approved location. We recommend Electric Avenue. After successfully completing the safety course, you take your completion certificate (form MSB-8 or MSB-8R ) to the Department of Public Safety, where you can apply for an 'M' class license. Applicants are not required to take the written exam nor the road test.