Trace element fractionation and the origin of tholeiitic and alkaline magma types