Can a player be given a red card for just 45 second, after which he will be allowed to continue playing again?
No. A red card means that the player is out for the rest of the game.
In youth football timed suspensions are possible (at least here they are), but they replace the 2nd yellow card and another yellow card after that suspension is no longer possible. Any offense that would lead to one results in a direct red card.
However, there were situations in the past where the red card was a mistake and the referee took it back. In such a case the player is allowed to return to the pitch.