In general because of the presence of periodic functions, this is not the simplest problem in the domain of curve fitting. However, this case is simple because $k$ is not a tunable parameter but a fixed constant.
You have $n$ data points $(t_i,y_i)$ and you want to perform a least square fit based on the model
$$y=a \sin(kt+z)$$
Rewrite is as
$$y=a \cos (z) \sin (k t)+a \sin (z) \cos (k t)$$ and define
$$A=a \cos (z)\qquad B=a \sin (z)\qquad S_i=\sin (k t_i)\qquad C_i=\cos (k t_i)$$ which makes the model to be
$$y=A \,S+B \,C$$ which is just a bilinear regression without intercept.
When solved for $(A,B)$, you have
$$a^2=A^2+B^2\qquad\qquad\text{and}\qquad\qquad z=\tan ^{-1}\left(\frac{B}{A}\right)$$
I tried an example : using $n=21$ and $k=2$, I generated the following table
$$\left(
\begin{array}{cc}
t & y \\
0.0 & 42 \\
0.5 & 121 \\
1.0 & 89 \\
1.5 & -25 \\
2.0 & -115 \\
2.5 & -99 \\
3.0 & 8 \\
3.5 & 108 \\
4.0 & 109 \\
4.5 & 10 \\
5.0 & -98 \\
5.5 & -115 \\
6.0 & -27 \\
6.5 & 87 \\
7.0 & 121 \\
7.5 & 44 \\
8.0 & -73 \\
8.5 & -123 \\
9.0 & -59 \\
9.5 & 59 \\
10.0 & 124
\end{array}
\right)$$
This gives
$$A=116.1789094\qquad\qquad\text{and}\qquad\qquad B=41.88715050$$ from which
$$a=123.4992808\qquad\qquad\text{and}\qquad\qquad z=0.3460335933$$
In fact the data were generated using
$$y_i=\lceil 123.456 \sin (2 t+0.345678)\rceil$$