Certainly you can do both, and more, in the same day, and it makes sense because they're right next to each other. But try to get advance tickets with entry times to minimize line-standing. I agree with above, a couple of hours is enough for the basilica. I didn't do the Secret Itineraries tour of the palace but it's often recommended here. I was fine on my own for 2-3 hours.
As for sequence, I'd say the basilica first because it's smaller (in the sense of fewer steps and different spaces inside). But ticket availability may dictate your choice. If I had to choose just one, I'd choose the basilica.
EDIT -- I went to the Correr Museum, across the piazza, and bought a combo ticket for that and the palace, used the palace ticket the next day. That gave me a much shorter ticket-buying line, and Correr was very interesting too. You could do all three sites in one day if you have the energy.