Yes, you can compost turnips.
Peeling/scrappings will rot down pretty quickly but whole turnips (neeps) are quite dense so take a while to compost down. Cut them up into smaller chunks if you want them to rot down quicker.
Cooked turnips can be composted as long as they have not been cooked with anything on the “don’t compost it!” list – like meat juices or dairy products.