A federal judge has ordered Riggs National Bank director Jorge E. Carnicero and a company he controls to repay about $64,000 to stockholders who sold him and associates Riggs stock while he secretly was negotiating a sale at a higher price to Joe L. Allbritton.

At the same time, U.S. District Court Judge Norma H. Johnson ordered Carnicero to pay about $53,750 to a charity of his choice and ordered FinAmerica Corp. to pay roughly $42,500 back to Riggs out of the profits from the sale under laws covering short-swing profits.

The payback plan came in settlement of charges against Carnicero and FinAmerica by the Securities and Exchange Commission. The SEC charged that Carnicero, who is also chairman of Dynalectron Corp., took unfair advantage of information about the price Allbritton was willing to pay, in violation of federal securities laws and his responsibility as a Riggs director to other bank shareholders.

Allbritton's purchase of the Carnicero block gave the multimillionaire 15 percent interest in the bank and set the stage for the current takeover fight between Allbritton and Riggs management. Allbritton now is attempting to acquire approximately 35 percent of the bank's stock.

According to the SEC, Carnicero's company, FinAmerica, bought 3,400 shares of stock for prices around $45 a share, knowing that Allbritton was prepared to pay $66 a share. The price later was raised to $67.50 a share to cover the costs of paying the bank for short-swing profits, according to the complaint.

The SEC also charged that Carnicero encouraged his administrative assistant, Raquel Aramendia, and Dynalectron director Raymond J. Mulligan, who is also president of Liggett & Myers, to buy large blocks of the bank's stock at relatively low prices. According to the complaint, a company controlled by Carnicero lent Armamendia the $91,500 needed to buy the stock. Carnicero then included the stock bought by the two associates in the block he sold to Allbritton.

Carnicero consented to the court order without admitting or denying the SEC's charges against him. In addition to the agreemen for relinquishing the profits, the order essentially requires Carnicero not to engage in similar acts in the future.

Under the order, FinAmerica must repay to shareholders from whom it bought stock the difference between the purchase price and $55. The remaining profit from selling the stock to Allbritton must be repaid to Riggs. The order requires Carnicero to repay stockholders from who Aramedia and Mulligan bought stock the difference between the purchase price and $55, and to pay the remaining profits to charity.

The $55 figure apparently reflects what the shareholders who sold to Carnicero and his associates might have been able to get on the market at a later point.