I'll assume that $1\leq k<d$, the other cases being easy. Then the long exact sequence of homotopy groups shows that $B$ is simply connected, so we have a Serre spectral sequence with untwisted coefficients: $$ E_2^{ij} = H^i(B)\otimes H^j(S^k) \Longrightarrow H^{i+j}(S^d), $$ with $d_r\colon E_r^{ij}\to E_r^{i+r,j-r+1}$. Let $u$ and $v$ be the generators of $H^k(S^k)$ and $H^d(S^d)$. The only possible differential is $d_{k+1}\colon H^i(B)u\to H^{i+k+1}(B)$, and this is has the form $au\mapsto ax$ for some $x\in H^{k+1}(B)$. The only way the spectral sequence can converge to $H^*(S^d)$ is if $k$ is odd and $H^*(B)=\mathbb{Z}[x]/x^{r+1}$ with $(r+1)(k+1)=v+1$. We can now apply Adams's theorem on elements of Hopf invariant one to the first attaching map in $B$ to see that $k\in\{1,3,7\}$. I think that there is an argument along similar lines that if $k=7$ we can only have $r\leq 2$, but I don't remember details. Thus, your fibration looks cohomologically like one of the standard fibrations $S^1\to S^{2r+1}\to \mathbb{C}P^r$ or $S^3\to S^{4r+3}\to \mathbb{H}P^r$ or $S^7\to S^{8r+1}\to\mathbb{O}P^r$. For the case $k=1$ we can use $[X,\mathbb{C}P^\infty]=H^2(X)$ to get a map $B\to\mathbb{C}P^\infty$ and check that it restricts to give a homotopy equivalence $B\to\mathbb{C}P^r$. In the other cases I think it is also true that $B$ is homotopy equivalent to $\mathbb{H}P^r$ or $\mathbb{O}P^r$, but the argument is more complicated and again I do not remember details. [UPDATE: See comment below from Igor Belegradek: this last sentence is apparently wrong.]