The problem is not well-specified. You can write a check, use a credit or debit card, or use an electronic payment app to avoid any use of cash whatever.
You can pay with 26 quarters and tell the seller to "keep the change." Again, no dollar bills, dimes, or pennies are involved.
If you pay with cash using the highest possible denominations, you can use the following complement of bills and coins to minimize the number of dollars, dimes, and pennies:
1 × $5
1 × $1
1 × 25¢
2 × 10¢ . . . (or substitute 4 × 5¢ to use no dimes)
4 × 1¢