There are direct buses, very long trip - I'd only take it if you're in a real hurry to get from A to B. Otherwise you could break up the trip and have a nice time of it along the way. Nam Xoi & Na Maew would probably be the easiest and put you in near Xam Nua from there you could stay a night or two and then head onward to either Nong Kiaow or Phonsovan depending on what attracted you as a stop off point on the way to Luang Prabang.
@caseyprinch - I'm sorry but I don't get it. The destinations you charted out, they're like a path through Vietnam to Laos linked by bus routes or something? I planned to touch Phonsovan now that you mentioned it.
Nam Xoi/Na Maew is the closest border crossing to Hanoi that gets you into Laos. It is very near Xam Nua - Sam Neua - on the other side of the border of Laos, that would make a good stopping point because once in Laos it'll take you a number of hours to get from anywhere to anywhere. The remainder of the post was offering to alternative options to move from Xam Nua to Luang Prabang , each with a stop to break up a long journey. Journey times would probably be fastest (a relative word) between Xam Nua and Phonsavan (plain of jars) then onto Luang Prabang - and you get to see the plain of jars. Nong Kiaow is a ride through beautiful scenery and then a nice town with some hiking in the area and a possible detour an hour up river to Mung Ngoi. Then you can catch a mini-bus or boat from Nong Kiaow down to Luang Prabang.
My spelling was off on the last post for some of the locations.