As long as the type is the same...
DOT 3, 4 and 5.1 are increasing quality/grade of glycol-based fluid, they are backwards compatible, but not forwards compatible. eg you can use 3, 4 and 5.1 in a system designed for 3, but not 3 in a system designed for a minimum of 4.
DOT 5 is a silicone base fluid, and should not be mixed with anything else if you plan on protecting the squishy parts of your body.