A former U.S. ambassador to the Dominican Republic pleaded guilty here yesterday to illegally using about $17,000 worth of embassy labor and supplies to build a swimming pool and prepare a retirement home for himself outside Santo Domingo.

Robert A. Hurwitch, 58, a career Foreign Service officer who held many prestigious government posts retiring from the Dominican Republic post last summer, was sentenced to two years' unsuppervide probation.

"I have dishonored a profession that I love," Hurwitch told U.S. Magistrate Jean F. Dwyer, in pleading for probation. "I shall carry this sense of guilt to my grave. I have given myself a life sentence of remorse, shame and self-castigation."

Hurwitch had received citations from presidents John F. Kennedy and Richard M. Nixon for his work. His major special assignments include participation in the early 1960s in a successfull project to free Cuban prisoners, and service as head of the 1969 Nicaraguan earthquake relief task force.

Magistrate Dwyer, who took the plea to the five criminal misdemeanor counts, said she was "personally sorrowing" for Hurwitch's plight and felt the "people of the county have lost something" because of his retirement. After announcing the suspend sentence and unsupervised probation, she commented, "Good luck to you."

Hurwitch's attorney, Mitchell Rogovin, had told Magistrate Dwyer that Hurwitch's plans for a retirement place in the country had gotten "out of hand," but that he now realized that he had broken the law.

Justice Department attorneys had agreed to stand silent at the sentencing, but did file with Magistrate Dwyer a detailed statement of facts outlining the evidence that resulted in five theft counts against Hurwitch.

According to that statement, embassy employes began commenting among themselves in January 1978 that Dominican employes of the embassy frequently had begun missing work.. One of their supervisors said that any information about their absences had to be obtained from the head of general services for the embassy.

The "frightened relutant" supervisor later admitted, however, that since October 1977 U.S. funds, equipment, material and labor had been used to renovate a house and begin work on a cottage and swimming pool for Hurwitch.

The work was being done on a farm owned by a Dominican businessman about 30 miles outside Santo Damingo. The businessman had agreed to give Hurwitch the right to live on the land indefinitely for the token sum of one peso a year, the government said.

Rogovin said, and the government agreed, that Hurwitch told embassy personnel to keep records of what they spent and he would repay them later. However, no payments had been made before the investigation began.

Hurwitch has since arranged for repayment by having the money taken from his State Department retirement fund, Rogovin and Justice Department attorneys Reid H. Weigarten and Eric H. Holder Jr. said.

The five specific charges against Hurwitch accused him of misusing construction supplies, household appliances, the labor of embassy personnel, and motor vehicles to transport workers and material to the building site.

During his court presentation, Rogovin showed Magistrate Dwyer photographs of the retirement home. The property is a one-story house and the only visible work on the other project was a concrete foundation.

Hurwitch could have received a total of five years in prison and could have been fined up to $5,000 on the charges. He said he has recently remarried, currently lives in the Dominican Republic and is trying to "salvage something from the life I made a shambles."