Absolutely, a commander-in-chief who has never served in uniform can and should lead from the Oval Office.
First, the Founding Fathers, in drafting the United States Constitution, placed tremendous emphasis on civilian control of the armed forces as the key to preventing a military dictatorship. That is why the president, as the nation's highest elected official, was vested with the authority, as Chief Executive, to command the military, while the Legislative Branch, the Congress, was given the power to declare war and to regulate interstate commerce.
Second, there is no correlation between military experience and competency as commander-in-chief. Many Americans viewed the late-President Ronald Reagan, who was not a veteran let alone a former military commander, as a far superior commander-in-chief to his predecessor, Jimmy Carter, who had served as an officer in the United States Navy. Similarly, Presidents Clinton and Obama, while subject to criticism over defense policies, were and are nevertheless competent commanders-in-chief.
Presidents are not alone in making potential life-and-death decisions regarding the use of the military. They are the ultimate decision-makers, but they rely on the advice of the Joint Chiefs of Staff as well as the civilian officials in the Office of the Secretary of Defense. Under U.S. law, the chairman of the Joint Chiefs of Staff is designated as the president's principal advisor on military matters, and their views are known to be respected by their civilian leaders.
The last high-ranking military officer to ascend to the presidency was Dwight Eisenhower, whose responsibilities as Supreme Allied Commander during World War II dwarfed the military qualifications of any president since. And Eisenhower understood the essential distinctions between military commanders and presidents, and respected the roles of each, as did the first general to serve as president, George Washington.
History has demonstrated that civilian elected officials are capable of commanding the armed forces from the White House. That does not mean there isn't tension during conflict between the uniformed military and the civilian officials; in fact, such tensions are the norm. It does, however, mean that the tradition of civilian control of the military in this country provides the most powerful model of democracy in the world, and reassures Americans that the scenario of a military dictatorship -- the "seven days in May" scenario -- will not come to fruition.
A prominent American journalist, upon observing the departure of Richard Nixon from office under threat of impeachment, marveled at the transition that had just occurred in the United States. An elected president was forced from office through entirely legitimate procedures, with a free press having played a major role, and not a single tank was anywhere to be seen. That was the essence of civilian control of the military.