Fortran has a special place in numerical programming. You can certainly make good and fast software in other languages, but Fortran keeps performing very well despite its age. Moreover, it's easier to make fast programs in Fortran. I've made fast programs in C++, but you have to be more careful about things like pointer aliasing. So, there has to be a reason for this, and a very technical one. Is it because the compiler can optimize more? I would really like to know technical details, so if I use another language I can take these things into consideration.

For example, I know -or so I think- that one thing is that the standard specifies that pointers are contiguous in memory always which means faster memory access. I believe you can do this in C++ by giving a flag to the compiler. In this way it helps to know what Fortran does good, so that if using another language we can imitate this.

Language designers face many choices.  Ken Kennedy emphasized two: (1) better abstractions and (2) higher- or lower-level (less or more machine-like) code.  While functional languages like Haskell and Scheme focus on the former, traditional scientific-computing languages like Fortran and C/C++ focused on the latter.  Saying that one language is faster than another is usually quite misleading: each language has a problem domain for which it excels. Fortran fares better in the domain of array-based numerical codes than other languages for two basic reasons: its array model and its explicitness.  

Array Model

Fortran programmers largely do array manipulations. For that, Fortran facilitates several compiler optimizations that are not available in other languages. The best example is vectorization: knowing the data layout enables the compiler to invoke assembly-level intrinsics over the array.

Language Explicitness

While it seems that a simpler language should compile "better" than a more complex one, that really isn't the case.  When one writes in an assembly language, there isn't much a compiler can do: all it sees are very-fine-grained instructions. Fortran requires explicitness (thus, more work by the programmer) only in cases that yield real rewards for array-based computing. Fortran uses simple data types, basic control flow, and limited namespaces; by contrast, it does not tell the computer how to load registers (which might be necessary for real-time).  Where Fortran is explicit, it enables things like complete type inference, which helps novices to get started.  It also avoids one thing that often makes C slow: opaque pointers. 

Fortran Can Be Slow

Fortran is not fast for every task: that's why not many people use it for building GUIs or even for highly unstructured scientific computing.  Once you leave the world of arrays for graphs, decision trees, and other realms, this speed advantage quickly goes away.  See the computer language benchmarks for some examples and numbers.
