There are many scenarios where the military, national guard, or law enforcement could be in a position to have to fire on American citizens.
If a Teaparty meeting with 50 armed guys gets whipped up and someone starts shooting it is going to be on between police and that group who is shooting. Those who do not lay down their arms could be expected to be fired upon. Do you think law enforcement officers are not going to do their jobs even if they happen to be personally sympathetic?
This question of "can you shoot Americans if asked to" is a pretty broad stroke that doesn't mean a thing if the specifics aren't set down.
When Obama was first elected it was more volatile for a couple of years than it is now. We had teaparty politicians talking in ways that were close to inciting "taking our government back", and "using our 2nd amendment remedies". That talk had it resulted in 100,000 people who "believed" they were doing the right thing actually doing something and stepping closer to actually doing something about that fantasy taking our government back thing would have been put down like dogs. As a minority that was trying to overthrow our government they would have been fired upon and few in the military would have had any morality thing keeping them from doing it.
A minority of Americans trying to use guns to take over our government is going to be at war, as long as they are a minority they are on the wrong side of this.
Now put the qualifier in and put a reality that all guns were being physically and forcibly confiscated and it would be different. I could see the military taking the side of Americans in that case. Without the qualifier the question put to military leaders doesn't mean will you fire on Americans under dictatorship conditions, a military leader is going to be thinking of it in terms of a minority armed takeover and there are unlikely any who would not fire on that minority group of Americans. If they were a majority they would vote their party in.
The hard right sees and thinks of this talk as being from their worst case scenario which is the "taking of our guns" The military and Commander in Chief sees it from a standpoint of it being from putting down an unwarranted insurgency that is trying to take over government. It's seen on that side as potentially having to quell rioting and chaos should the infrastructure melt down.
If people with guns are fighting other people and taking their food the military will have a job to do, and it will entail shooting unruly Americans.
It's a valid question and one that doesn't necessarily mean the thing that the right is focused on with a certain sense of tunnel vision.
I'm pretty sure if things went to crap I'd be shooting Americans, and so would everyone else, but it wouldn't be over politics, it would be over survival as in food and water.
That's what the government and military is forced to think about, restoring order. Those with guns will be needing to maintain order or they will be on the wrong side of the military who's job that is.