Only required for mopeds and motorcycles. Bicycles do not need any form of license!
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.
However, the State of Texas is requiring you to take the Motorcycle Safety Course at a state approved location in order to obtain a valid license for a moped or motorcycle. 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.