Can a D-brane be closed and contractible? Let's consider for simplicity D-branes in bosonic string theory. I have a very basic question whose answer I couldn't find clearly stated in the few textbooks where I looked for it. 
Take for instance a D1-brane. On the 1+1 dimensional world-volume live a gauge field (a vector with 2 real components) and 24 scalars, which presumably parametrize the shape of the brane in space-time. For instance, I quote from Johnson's textbook that  they are exactly analogous to the embedding coordinate map $X^{\mu}(\sigma,\tau)$" used to describe fundamental strings.
But there is in my opinion a crucial difference, because we have only 24 scalars and not 26. This means that the world-volume of the brane should be viewed as the graph of a map $\mathbb{R}^2 \longrightarrow \mathbb{R}^{24}$. This is a severe restriction on the allowed shapes for a brane. It implies that the D-string can not be closed (hence the question in the title - I added a condition of contractibility to rule out a trivial solution like space compactification), but is of course far more restrictive. 
What worries me is that I have never seen this restriction much emphasized, so maybe I missed something and I am completely wrong... I thought the explanation could come from the RR charge carried by any D-brane when you go to the superstring, but that is just a guess. 
 A: The counting of the dimensions is the same for D1-branes and the fundamental F1-strings. There are 24 physical scalars because the embedding of a 2-dimensional world sheet (of either F-string or D-string) may be locally specified by 24 functions. For example, as long as the coordinates $X^0,X^1$ are changing at least "a little bit" in a region of the world sheet, the remaining 24 coordinates $X^2$-$X^{25}$ may be written as functions of $X^0$ and $X^1$. That's 24 functions that fully specify the embedding of the 2D world sheet to the 26D spacetime.
In other words, you may have 26 functions $X^\mu(\sigma,\tau)$ of two world sheet coordinates but two of them may be eliminated by a reparameterization $(\sigma,\tau)\to (\sigma',\tau')$ that is chosen to respect a gauge choice.
A particular gauge choice may break down in the regions where at least one of the coordinates like $X^0,X^1$ in the example above reaches a stationary point. In these regions, one has to choose a different gauge choice but the physical content is still just 24 transverse scalars of some kind, despite the field redefinition.
Branes of any dimension may surely be compact or have pretty much any topology or shape you may think of. Wrapped D-branes are actually very important in the scheme of string dualities. If they're wrapped on cycles (submanifolds) whose volumes shrink to zero, these wrapped D-branes become particles that may go massless, and therefore become very important. That is, for example, the reason why M-theory or type IIA string theory on the ADE $C^2/\Gamma$ orbifolds singularities carries non-Abelian gauge supermultiplet located at the singular locus itself.
Compact branes having closed and contractible (topologically trivial) shape also exist but they cannot be stable (which also means that they cannot preserve any supersymmetry). They collapse much like a star collapses under its own gravity (self-attraction). This instability may often be seen through the existence of tachyonic modes.
