I had the same problem when my dog was a puppy. We started with feeding him Purina ProPlan Large Breed Puppy. After learning more about dog food I transitioned to Orijen Large Breed Puppy. Even after he was fully transitioned to that he was having runny stools. I added a spoon full of pumpkin to each meal to try to firm them up and it got a little better, but not completely better. We had taken him to the vet and checked for parasites, etc.
After fully trying the pumpkin and ruling out everything except the food I switched him to a food with a lower fat content, Solid Gold Wolf Cub. I kept doing the pumpkin (he loves it). After the transition the stools firmed up. So for the rest of his puppy-hood I fed Solid Gold Wolf Cub and Acana Wild Prairie (all life stages). Firmed up and is still firm (now he is back on Orijen Adult Food).
There are a ton of great dog foods out there so feel free to try several, but remember that seeing results after a transition can take a while, so you have to be patient. Pumpkin can't hurt, I still give it to my dog as a kong-filler. You just buy the plain, canned variety and add a spoonful. Overfeeding can also cause loose stools so you should make sure that you aren't doing that.
I don't know much about more serious health problems, just about trying new foods. I understand how frustrating it is worrying about what is wrong with the poop (and then people think you are crazy when your dog poops at the park and you are dancing around because it is firm...)- good luck!