Are you sure this isn't part of a quest?
This happens in a Markath quest, where going to jail starts the next stage of the quest.
Details are in the spoiler below.
This quest
gaming.stackexchange.com/users/205/Sigh
You can't.
If those are you only options, then your crime was so severe that a mere bounty won't satisfy the law-keepers.
Your options are to go to jail (where your bounty will be wiped clean) or die.
Afterthought:
Third Option: KILL!
THEM!
ALL!
gaming.stackexchange.com/users/15095/Ender
If you have this then your bounty exceeds your current gold.
gaming.stackexchange.com/users/43819/user43819
Travel around, you will eventually meet a bounty hunter who will offer you to pay your bounty + 10% finder's fee, then your bounty will be cleared.
gaming.stackexchange.com/users/19827/kotekzot
You can try console commands to 'force' paying your bounty.
Make a save game first, and then in the game, open up the console by pressing ~ , then click on one of the arresting/assaulting guard(s).
The guard's RefID (a bunch of numbers) should show up in the screen.
After that, type in paycrimegold in the console.
That should put you just outside the nearest jail of the hold you're in, with no more bounty on you while still keeping your stolen items.
More info on the paycrimegold console command at the UESP wiki's "Console" article.
paycrimegold - Pay the bounty for the faction targeted NPC belongs to (the bounty gold will be removed from your inventory).
The first 0-1 choice refers to being sent to jail: entering 1 will let you be teleported to the respective faction's jail, entering 0 won't.
The second 0-1 choice refers to keeping your stolen items: entering 0 means you do not lose your stolen items, entering 1 means you do.
If you don't add any choice you will be sent to jail without losing your stolen items.
The faction ID is needed if you can't target an NPC.
May also help in case guards attack you on sight.
Note that if you don't have enough gold, you can also use the console to add gold to your character.
The console command to do that is player.additem f x where x is the amound of gold you would like to add.
gaming.stackexchange.com/users/4797/galacticninja
You can also leave for awhile and come back in a month 30 days
and they will not be hostile and pay or serve your sentence
gaming.stackexchange.com/users/86519/Pokemon
What should I do if I have a bounty but a guard will only let me fight or go to prison?  This happened to me in the city of Solitude.
How do I pay off my bounty when the only options are to fight back or be arrested?
gaming.stackexchange.com
<the-elder-scrolls-5-skyrim>
gaming.stackexchange.com/questions/70326
gaming.stackexchange.com/users/26327/Nathan Anacleto
Travel around and find a bounty hunter who will pay your bounty. You can also leave for a while and come back in a month. While this problem seems to occur when the player lacks money, the community suggests different ways to by pass the problem.
It is implied that the issue might be the money. In game means to resolve the issue, are suggested. Console commands are proposed.