Update II:
With a given point (x,y) and a given angle of 45° we could do it this way. Main point is to get the correct intercept:
# formula
# y=slope*x+intercept
x =5
y =3
slope <- tan(45)
intercept = (slope*x - y)*-1
plot.new()
plot(-5:5, -5:5, type = "n")# setting up coord. system
abline(h=0, v=0)
points(5,3, pch = 22, cex=2, col="green", bg="red", lwd=2)
abline(a=intercept, b=slope, col="red")
#a, b : single values specifying the intercept and the slope of the line

Update I:
I am sorry but I don't know if it is clear for you that each line through the positive x axis with a degree of 45 has the slope 1!?
See here:
General approach:
slope of line through (point x,y) with an angle of 45°:
slope = tan(alpha)
Inclination of alpha is the angle of line with positive x-axis.
For your example:
slope = tan(45°) = 1
Take any point of x,y for example (x, y) = (5,3):
y - y0 = slope(x-x0)
hence:
y - 3 = 1 (x-5)
y = x-2
y = the intercept = 3
Now you have x, the intercept and the slope and you could plot:
plot.new()
plot(1, type="n", xlab="", ylab="", xlim=c(0, 10), ylim=c(0, 10))
abline(a=y, b=1)
#a, b : single values specifying the intercept and the slope of the line
You get:

Maybe you want a line through the x axis then you have to adapt the intercept:
plot.new()
plot(1, type="n", xlab="", ylab="", xlim=c(0, 10), ylim=c(0, 10))
abline(a=-3, b=1)
#a, b : single values specifying the intercept and the slope of the line
You get:

First answer:
You could modify the degree of 45° as you desire: Note angles are in radians for the tan function!
plot.new()
plot(x=0, y=0, xlim=c(1, 8), ylim=c(1, 8), pch=15, cex=3)
abline(a=0, b=tan(45*pi/180))
