What the rules say
"Lawful Good" does not equal "Stupid Nice".
What the players handbook says about the paladin's code is:
Additionally, paladins swear to follow a code of conduct that is in line with lawfulness and goodness. (p. 42)
Code of Conduct: A paladin must be of lawful good alignment
and loses all class abilities if she ever willingly commits an evil act.
Additionally, a paladin’s code requires that she respect legitimate
authority, act with honor (not lying, not cheating, not using poison,
and so forth), help those in need (provided they do not use the help
for evil or chaotic ends), and punish those who harm or threaten
“Law” implies honor, trustworthiness, obedience to authority, and
“Good” implies altruism, respect for life, and a concern for the
dignity of sentient beings. Good characters make personal sacrifices
to help others. (p.104)
Answers to the questions
Can a paladin backstab a demon?
Yes, there is nothing in there that says you can't sneak up and backstab some bastard who richly deserves it!
- Can a paladin lie to a demon?
No, but why would he want to? Your code prevents lying: it does not compel truth telling, feel free to shut up if the alternative is lying. Of course as a Lawful character you can deceive so long as you don't cross the line into lying (i.e. speaking known untruths).
- Can a paladin steal from a demon?
No but ... can a demon legitimately own anything?
- Must a paladin offer mercy to a demon?
No, demons are irredeemable; mercy is for those who can be rehabilitated. However, to beg the broader question, there is nothing in Lawful Good or the Paladin's code that requires mercy to be offered to anyone. Paladins make perfect executioners: the condemned have been found guilty according to law by legitimate authority and the paladin shows them the consideration of a sharp blade.
- If a demon begs for a fair trial or for mercy (even if the paladin knows the demon will try to escape), must he take the demon as a prisoner and treat it with the due respect to a prisoner? Is "Summary execution" a fair trial enough?
No, Yes a demon by its existence "harm[s] or threaten[s] innocents", ergo they must be punished.
Demons are a bad example
Demons are Chaotic Evil - they are not so because of what they do, they are so because of what they are. Everything a demon is is anathema to everything a paladin is. There is no more moral dilemma involved in fighting demons there is in fighting floodwater ... whatever it takes is what you do. The only way a paladin can suffer a moral crisis in a conflict with a demon is if they don't resist to the best of their ability. Which is not to say they can't run away if they are overmatched: perhaps getting away and warning others is the best they can do.
DMs putting ambiguous moral dilemmas in front of paladins is not fair!
If you have a campaign where you expect paladins to be played as written then you must have a world where there is absolute law and chaos, good and evil and the paladin knows which is which instinctively. To do otherwise is to change the rules of magic on your wizard and the skill system on your rogue - its just cheating by the DM: which is both chaotic and evil!
If you like a game with ambiguous morality then the paladin must be allowed to follow the code as best they can. Paladins end up a little grubby but they are still a hell of a lot cleaner than any other class. To lose paladin status you must violate your code egregiously and unambiguously.
Further discussion of this can be found at How do I get my PCs to not be a bunch of murderous cretins?
Similar but 5e based: How do you adjudicate what alignment a PC's actions are?