Robert A. Latta, the Denver water meter reader who strolled into the White House amid unprecedented security on Inauguration Day, pleaded guilty in D.C. Superior Court yesterday to unlawful entry.

Judge Paul F. McArdle sentenced Latta to 30 days in jail, but suspended the sentence and ordered supervised probation for one year. He also ordered Latta to stay five miles away from President Reagan and to notify his probation office in Denver if he intends to visit the District again.

"I've learned from this more than any college course . . . how people can be hurt for the rest of their lives for a simple mistake," the 46-year-old Latta said after the brief hearing.

"It scares me. A person's life can be ruined for something . . . I thought didn't seem very important at the time.

"I had no malicious intent when I did it. But other people thought it was a bad situation."

On Jan. 20, according to authorities, Latta walked into the White House with members of the U.S. Marine Orchestra who had come to perform for the president's private swearing-in ceremony, the day before the public inauguration.

Latta wandered about the main floor of the White House, authorities said, until he was spotted by an usher and later arrested. He did not see the inaugural ceremony.

The incident involving Latta, who came to be called "the White House visitor," embarrassed the Secret Service, which had spent hundreds of thousands of dollars installing metal detectors, concrete barriers and complex security procedures to ensure the president's safety.

Yesterday, as part of the plea agreement, prosecutors dropped a charge stemming from Latta's failure to appear at a hearing on May 1.

Assistant U.S. Attorney Maria Walicki told the judge that prosecutors were prepared to prove that Latta was observed in what is known as the Family Dining Room, although it is not part of the first family's living quarters, and was not authorized to be in the complex.

Latta, under questioning by the judge, quibbled with some details of the prosecutor's assertions, including the statement about the dining room.

"If they're accusing me, they should have all the details right," Latta said at one point, but then entered the guilty plea.

Latta was allowed to plead under a U.S. Supreme Court decision that allows defendants to plead guilty without admitting they committed the crime but agreeing that the prosecution could prove its case.

Outside the courthouse, Latta said he will return to his job with the Denver water department and try to pay off more than $3,000 in debts he has incurred during the legal proceedings.

He said he would still like to return to Washington -- "every month, if I could, but finances probably will make that impossible."

He said that "like most patriotic Americans," he was "brought up to have reverence and respect for government," and that Washington represents to him "all the ideals, principles and aspirations of a country that is free."

His brush with the law, he said, will follow him the rest of his life, but he added, "People learn from adversity.

"To quote my mother," Latta said in parting, " 'Everything happens for the best.' "