Dot 3 and 4 can be used together, because they are similar in their make up. They both will remove water that can get in lines, and they both have similar corrosive characteristics. Dot 5 however is a different make up, silicon I believe. Dot 5 can not be used in systems that contain dot 3 or 4. Dot 5 also needs to be used in systems that have tighter seals because it is thinner and does not absorb moisture like the others. So if you get water in your line with dot 5 it stays in little bb's and then boils when you heat up the fluid.
Basically use either 3 or 4 but not 5 unless you are running brakes designed for dot 5 and 5.1