Do Libyan citizens who live in Libya and don't hold any other nationality need transit visas for the UK and Canada? The plan would be to travel on British Airways from Istanbul, Turkey to the Dominican Republic, with stops in the those two countries.
As stated in Timatic, the database used by Airlines, you will need a visa to change planes in Canada.
As stated on the GOV.UK website, if you change flights in the UK and have a valid Canadian visa, you do not need a UK transit visa.
Similarly, for the Dominican Republic, also according to Timatic, you can enter on a valid Canadian visa.
So, you only need a Canadian transit visa, and no other visas. No visa for the UK and no visa for the Dominican Republic.
If you're flying back the same way, then, when applying for the Canadian visa, tell them that you need to transit Canada twice, so they'll give you the correct visa.