Let's say both Democrats and Republicans both put forward their two candidates (Sanders/Clinton, Trump/Cruz).
Would this work within a modified set of party bylaws? For example, the RNC would support both Cruz and Trump, and the two would be part of a team. The two would be prohibited from campaigning against one another.
All electoral votes would be counted towards either Democrats or Republicans, not a particular candidate. Whichever candidate of the party with the most electoral votes receives the largest portion of the popular vote becomes President.
I'd imagine you run into issues where the person with the largest popular vote is on the losing "team" with lesser electoral votes... but that's not much different from Bush/Gore.
I think this idea is a weird cousin to electoral fusion.
They do this already... they call it a Primary.
Edit: to prevent this from being a shitpost, here is a video explanation of a better system than the US uses. CGP Grey has a whole series on voting that is well worth the listen to.